package com.lantu.wisdom.controller;


import com.lantu.framework.common.utils.ResponseWrapper;
import com.lantu.wisdom.model.VxComment;
import com.lantu.wisdom.model.WAnswer;
import com.lantu.wisdom.model.WQuestion;
import com.lantu.wisdom.service.VxCommentApi;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zch
 * @since 2021-06-29
 */
@RestController
@RequestMapping("/vxComment")
@Api(tags = "建议")
public class VxCommentController {


    @Autowired
    private VxCommentApi commentApi;

    @ApiOperation(value = "意见反馈")
    @RequestMapping(value = "/addComment", method = RequestMethod.POST)
    public ResponseWrapper reversion(@RequestParam String comment, @RequestParam String userId) {
        VxComment comment1 = new VxComment();
        comment1.setContent(comment);
        comment1.setUserId(userId);
        comment1.setCreateDate(System.currentTimeMillis());
        boolean save = commentApi.save(comment1);
        return ResponseWrapper.success(save);
    }


}

